<!DOCTYPE html>
<html>

<head>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">


	<title>我的店铺</title>
	<meta name="keywords" content="我的店铺">
	<meta name="description" content="我的店铺">

	<link href="/Partner/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
	<link href="/Partner/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
	<link href="/Partner/static/css/plugins/iCheck/custom.css" rel="stylesheet">
	<link href="/Partner/static/css/animate.min.css" rel="stylesheet">
	<link href="/Partner/static/css/style.min.css?v=4.0.0" rel="stylesheet">

	<link rel="stylesheet" type="text/css" href="/Store/css/WdatePicker/skin/WdatePicker.css" />
	<script src='/NewAdmin/js/jquery-2.0.3.min.js' type="text/javascript" ></script>
	<script src="/NewAdmin/js/common.js" type="text/javascript" ></script>
	<script src="/static/js/layer2.1/layer.js"></script>

	<script src="/Store/css/WdatePicker/WdatePicker.js" type="text/javascript" charset="utf-8"></script>
	<base target="_self">
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">


<div class="main-content">

    <div class="page-content">
        <form action="{:U('Store/store_list')}" method="get" class="form-inline">
        	<section class="panel-default m-b-sm" style="margin:5px 0;">
				<div class="alert alert-info">
					<p>
	                  <i class="fa fa-hand-o-right m-r-xs"></i><strong>操作提示</strong>
	                </p>
                    <p class="alert-p m-l-xl"><i class="fa fa-caret-right m-r-xs"></i>该页面展示了商城店铺所有的商品信息，可对店铺进行编辑修改操作。</p>
                    <p class="alert-p m-l-xl"><i class="fa fa-caret-right m-r-xs"></i>可输入店铺名称关键字进行搜索。</p>
            	</div>
			</section>
           <div class="row padder-v">
				<div class="col-sm-1">
					<a href="{:U('Store/shopadd')}" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> 添加店铺 </a>
				</div>
				<div class="col-sm-2">
					店铺名称：
					<input type="text" name="title" value="{$_GET['title']}" class="form-control input-sm " placeholder="请输入店铺名称" style="width: 60%" />
				</div>
				<div class="col-sm-4">
					时间：
					<input type="text" onclick="WdatePicker()" class="form-control input-sm" style="width: 30%" name="addtime" value="<?PHP echo $_GET['addtime']?$_GET['addtime']:''; ?>">
					-
					<input type="text" onclick="WdatePicker()" class="form-control input-sm" style="width: 30%" name="addtime1" value="<?PHP echo $_GET['addtime1']?$_GET['addtime1']:''; ?>">
				</div>
				<div class="col-sm-2">
					是否营业：<select name="status">
	                			<option value="" <?=I('get.status') === ''?'selected':''?>>全部</option>
	                			<option value="0" <?=I('get.status') === '0'?'selected':''?>>停业</option>
	                			<option value="1" <?=I('get.status') === '1'?'selected':''?>>营业</option>
	                		 </select>
				</div>
				<div class="col-sm-2">
				是否推荐：  <select name="recommend">
		                		<option value="" <?=I('get.recommend') === ''?'selected':''?>>全部</option>
		                		<option value="0" <?=I('get.recommend') === '0'?'selected':''?>>不推荐</option>
		                		<option value="1" <?=I('get.recommend') === '1'?'selected':''?>>推荐</option>
		                	</select>
				</div>
				<div class="col-sm-1">
					<button class="btn btn-sm btn-info" type="submit">搜索</button>
					
				</div>
			</div>
			
		
        </form>

 
			<table id="sample-table-1" class="table table-striped table-bordered table-hover">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>店铺名称</th>
					<th>联系人</th>
					<th>电话</th>
					<th>区域</th>
					<th width="100">平台抽取比率</th>
                	<th width="100">状态</th>
                	<th width="200">加入时间</th>
                	<th width="250">操作</th>
				</tr>
			</thead>
			<tbody>
				<volist name="storeArray" id="row">
				
					<tr class="list" id="list<?=$row['id']?>">
						<td>{$row['id']}</td>
						<td style="font-weight:bold;">
							{$row['title']}
							<php>
								$u_id=session('u_id');
								if($u_id==$row['uid']){
							</php>
							<a class="btn btn-xs btn-info" href="javascript:;">我的</a>
							<php>}</php>
						</td>
						<td>{$row.rel_name}</td>
						<td>{$row.rel_phone}</td>
						<td>
							<php>
								if($row['province']){
								$province=getProvinceInfo($row['province']);
								}else{
								$province='';
								}
								if($row['city']){
								$city=getCityInfo($row['city']);
								}else{
								$city='';
								}
								if($row['district']){
								$district=getDistrictInfo($row['district']);
								}else{
								$district='';
								}

							</php>
							{$province.province_name} {$city.city_name} {$district.district_name}
						</td>
						<td>{$row['extraction']*100}%</td>
						<td><if condition="$row.status eq '1'">营业<else/>停业</if></td>
						<td>{$row.addtime|date='Y-m-d H:i:s',###}</td>						
						<td>

							<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
								<php>
									$u_id=session('u_id');
									if($u_id==$row['uid']){
								</php>
								<a class="btn btn-xs btn-danger" href="{:U('Store/shopadd',array('id'=>$row['id']))}">编辑</a>

								<php>}else{</php>
								<a class="btn btn-xs btn-info" href="{:U('Store/shopadd',array('id'=>$row['id']))}">查看</a>
								<php>}</php>

							</div>
						</td>
					</tr>
				</volist>
			</tbody>
		</table>
		

        <div>{$page} </div>
    </div>
</div>
</div>



</body>

</html>





